library(tidyverse)
## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.1 ──
## ✔ ggplot2 3.4.0     ✔ purrr   0.3.4
## ✔ tibble  3.1.6     ✔ dplyr   1.0.8
## ✔ tidyr   1.2.0     ✔ stringr 1.4.0
## ✔ readr   2.1.2     ✔ forcats 0.5.1
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
m <- read_csv("DOH.csv")
## Rows: 9867 Columns: 32
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr  (3): Post_oldid, date, state
## dbl (29): Real_ID, COVID_Post, RiskFactor_2_CTA, SocialDisparities_3_CTA, De...
## 
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
m
## # A tibble: 9,867 × 32
##    Post_oldid Real_ID date     COVID_Post RiskFactor_2_CTA SocialDisparities_3_…
##    <chr>        <dbl> <chr>         <dbl>            <dbl>                 <dbl>
##  1 1             2069 9/22/20           1               88                    88
##  2 2             2070 8/27/20           1               88                    88
##  3 3             2071 12/29/20          1               88                    88
##  4 4             2072 9/29/20           1               88                    88
##  5 5             2073 10/6/20           1               88                    88
##  6 6             2074 12/31/20          1               88                    88
##  7 7              403 4/2/20            1               88                    88
##  8 8             5425 12/1/20           1               88                    88
##  9 9             5842 12/20/20          1               88                    88
## 10 10            2075 3/5/20            1               88                    88
## # … with 9,857 more rows, and 26 more variables: Debunk_4_CTA <dbl>,
## #   UncertaintyReduction_5_CTA <dbl>, Testing_6_CTA <dbl>, Vaccine_7_CTA <dbl>,
## #   Mental_8_YesNo <dbl>, Emotion_9_Number <dbl>, Praise_10_Number <dbl>,
## #   Pop_11_Number <dbl>, Language_12_Number <dbl>, Action_13_CTA <dbl>,
## #   Positive_14a_Number <dbl>, Negative_14b_Number <dbl>,
## #   Individual_14c_Number <dbl>, Collective_14d_Number <dbl>,
## #   `State_ recode` <dbl>, Gov_poli <dbl>, Trifecta <dbl>, …
table(m$RiskFactor_2_CTA)
## 
##    0    1    2    3    4    5    6    7    8    9   10   11   12   13   14   15 
##   19  300  268  212  220  105   69   55   35   12   22    8    1    2    4    2 
##   16   18   25   26   88 
##    5    2    1    1 8524
table(m$SocialDisparities_3_CTA)
## 
##    0    1    2    3    4    5    6    7    8   11   15   26   88 
##   12  111   25    9    8    1    2    3    1    1    2    1 9691
table(m$Debunk_4_CTA)
## 
##    0    1    2    3    4    5    6    7    8    9   11   15   88 
##   54  180   86   40   44   11    5    8    3    1    1    2 9432
table(m$UncertaintyReduction_5_CTA)
## 
##    0    1    2    3    4    5    6    7    8    9   10   11   12   13   14   15 
##  871 4561 1733  941  473  306  199  102   68   24   61   22    3    4    4    5 
##   16   17   18   25   26   88 
##    5    1    4    1    1  478
table(m$Testing_6_CTA)
## 
##    0    1    2    3    4    5    6    7    8    9   10   11   12   13   14   15 
##  567  644  279   81   32   12   17    4    2    4   28   12    1    3    1    3 
##   18   26   88 
##    2    1 8174
table(m$Vaccine_7_CTA)
## 
##    0    1    2    3    4    5    6    7    8    9   15   88 
##  429  272  134   26   11   10   10    5    2    1    2 8965




```r
p <- read_csv("DOH1.csv")
## Rows: 9867 Columns: 32
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr  (3): Post_oldid, date, state
## dbl (29): Real_ID, COVID_Post, RiskFactor_2_CTA, SocialDisparities_3_CTA, De...
## 
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
p
## # A tibble: 9,867 × 32
##    Post_oldid Real_ID date     COVID_Post RiskFactor_2_CTA SocialDisparities_3_…
##    <chr>        <dbl> <chr>         <dbl>            <dbl>                 <dbl>
##  1 1             2069 9/22/20           1               88                    88
##  2 2             2070 8/27/20           1               88                    88
##  3 3             2071 12/29/20          1               88                    88
##  4 4             2072 9/29/20           1               88                    88
##  5 5             2073 10/6/20           1               88                    88
##  6 6             2074 12/31/20          1               88                    88
##  7 7              403 4/2/20            1               88                    88
##  8 8             5425 12/1/20           1               88                    88
##  9 9             5842 12/20/20          1               88                    88
## 10 10            2075 3/5/20            1               88                    88
## # … with 9,857 more rows, and 26 more variables: Debunk_4_CTA <dbl>,
## #   UncertaintyReduction_5_CTA <dbl>, Testing_6_CTA <dbl>, Vaccine_7_CTA <dbl>,
## #   Mental_8_YesNo <dbl>, Emotion_9_Number <dbl>, Praise_10_Number <dbl>,
## #   Pop_11_Number <dbl>, Language_12_Number <dbl>, Action_13_CTA <dbl>,
## #   Positive_14a_Number <dbl>, Negative_14b_Number <dbl>,
## #   Individual_14c_Number <dbl>, Collective_14d_Number <dbl>,
## #   `State_ recode` <dbl>, Gov_poli <dbl>, Trifecta <dbl>, …
colnames(p)
##  [1] "Post_oldid"                 "Real_ID"                   
##  [3] "date"                       "COVID_Post"                
##  [5] "RiskFactor_2_CTA"           "SocialDisparities_3_CTA"   
##  [7] "Debunk_4_CTA"               "UncertaintyReduction_5_CTA"
##  [9] "Testing_6_CTA"              "Vaccine_7_CTA"             
## [11] "Mental_8_YesNo"             "Emotion_9_Number"          
## [13] "Praise_10_Number"           "Pop_11_Number"             
## [15] "Language_12_Number"         "Action_13_CTA"             
## [17] "Positive_14a_Number"        "Negative_14b_Number"       
## [19] "Individual_14c_Number"      "Collective_14d_Number"     
## [21] "State_ recode"              "Gov_poli"                  
## [23] "Trifecta"                   "White_\bpercent"           
## [25] "minority_percent"           "Poverty_percent"           
## [27] "ProspertiyRanking"          "year"                      
## [29] "month"                      "day"                       
## [31] "state"                      "cases"
summary(p)
##   Post_oldid           Real_ID         date             COVID_Post
##  Length:9867        Min.   :   1   Length:9867        Min.   :1   
##  Class :character   1st Qu.:2468   Class :character   1st Qu.:1   
##  Mode  :character   Median :4935   Mode  :character   Median :1   
##                     Mean   :4935                      Mean   :1   
##                     3rd Qu.:7402                      3rd Qu.:1   
##                     Max.   :9868                      Max.   :1   
##                                                                   
##  RiskFactor_2_CTA SocialDisparities_3_CTA  Debunk_4_CTA  
##  Min.   : 0.00    Min.   : 0.00           Min.   : 0.00  
##  1st Qu.:88.00    1st Qu.:88.00           1st Qu.:88.00  
##  Median :88.00    Median :88.00           Median :88.00  
##  Mean   :76.49    Mean   :86.46           Mean   :84.21  
##  3rd Qu.:88.00    3rd Qu.:88.00           3rd Qu.:88.00  
##  Max.   :88.00    Max.   :88.00           Max.   :88.00  
##                                                          
##  UncertaintyReduction_5_CTA Testing_6_CTA   Vaccine_7_CTA   Mental_8_YesNo   
##  Min.   : 0.000             Min.   : 0.00   Min.   : 0.00   Min.   :0.00000  
##  1st Qu.: 1.000             1st Qu.:88.00   1st Qu.:88.00   1st Qu.:0.00000  
##  Median : 1.000             Median :88.00   Median :88.00   Median :0.00000  
##  Mean   : 6.111             Mean   :73.14   Mean   :80.04   Mean   :0.01824  
##  3rd Qu.: 3.000             3rd Qu.:88.00   3rd Qu.:88.00   3rd Qu.:0.00000  
##  Max.   :88.000             Max.   :88.00   Max.   :88.00   Max.   :1.00000  
##                                                                              
##  Emotion_9_Number  Praise_10_Number  Pop_11_Number     Language_12_Number
##  Min.   :0.00000   Min.   :0.00000   Min.   : 0.0000   Min.   :0.0000    
##  1st Qu.:0.00000   1st Qu.:0.00000   1st Qu.: 0.0000   1st Qu.:0.0000    
##  Median :0.00000   Median :0.00000   Median : 0.0000   Median :0.0000    
##  Mean   :0.02017   Mean   :0.04267   Mean   : 0.1493   Mean   :0.0824    
##  3rd Qu.:0.00000   3rd Qu.:0.00000   3rd Qu.: 0.0000   3rd Qu.:0.0000    
##  Max.   :6.00000   Max.   :8.00000   Max.   :13.0000   Max.   :6.0000    
##                                                                          
##  Action_13_CTA    Positive_14a_Number Negative_14b_Number Individual_14c_Number
##  Min.   : 0.000   Min.   :0.0000      Min.   :0.00000     Min.   :0.0000       
##  1st Qu.: 1.000   1st Qu.:0.0000      1st Qu.:0.00000     1st Qu.:0.0000       
##  Median : 1.000   Median :0.0000      Median :0.00000     Median :0.0000       
##  Mean   : 2.493   Mean   :0.6292      Mean   :0.02017     Mean   :0.1806       
##  3rd Qu.: 2.000   3rd Qu.:1.0000      3rd Qu.:0.00000     3rd Qu.:0.0000       
##  Max.   :88.000   Max.   :8.0000      Max.   :6.00000     Max.   :7.0000       
##                                                                                
##  Collective_14d_Number State_ recode      Gov_poli        Trifecta    
##  Min.   :0.0000        Min.   : 1.00   Min.   :1.000   Min.   :1.000  
##  1st Qu.:0.0000        1st Qu.: 5.00   1st Qu.:1.000   1st Qu.:1.000  
##  Median :0.0000        Median :13.00   Median :1.000   Median :2.000  
##  Mean   :0.4692        Mean   :20.78   Mean   :1.486   Mean   :1.677  
##  3rd Qu.:1.0000        3rd Qu.:34.00   3rd Qu.:2.000   3rd Qu.:2.000  
##  Max.   :8.0000        Max.   :51.00   Max.   :2.000   Max.   :3.000  
##                                                                       
##  White_\bpercent minority_percent Poverty_percent ProspertiyRanking
##  Min.   :21.70   Min.   : 7.40    Min.   : 7.50   Min.   : 2.00    
##  1st Qu.:53.20   1st Qu.:24.30    1st Qu.:10.40   1st Qu.:11.00    
##  Median :65.30   Median :34.70    Median :12.00   Median :28.00    
##  Mean   :62.74   Mean   :37.24    Mean   :12.62   Mean   :27.73    
##  3rd Qu.:75.70   3rd Qu.:46.80    3rd Qu.:14.10   3rd Qu.:41.00    
##  Max.   :92.60   Max.   :78.30    Max.   :18.80   Max.   :51.00    
##                                                                    
##       year          month             day           state          
##  Min.   :2020   Min.   : 1.000   Min.   : 1.00   Length:9867       
##  1st Qu.:2020   1st Qu.: 5.000   1st Qu.: 9.00   Class :character  
##  Median :2020   Median : 9.000   Median :17.00   Mode  :character  
##  Mean   :2020   Mean   : 8.152   Mean   :16.32                     
##  3rd Qu.:2020   3rd Qu.:12.000   3rd Qu.:24.00                     
##  Max.   :2020   Max.   :12.000   Max.   :31.00                     
##                                                                    
##      cases      
##  Min.   :    0  
##  1st Qu.:  121  
##  Median :  583  
##  Mean   : 2011  
##  3rd Qu.: 2208  
##  Max.   :64986  
##  NA's   :422
p1 <- p %>% 
  mutate(RiskFactor_2_CTA = recode(RiskFactor_2_CTA, '88' = 0, 
                                                       '0'=1, '1'=1, '2'=1, '3'=1, '4'=1, '5'=1,
                                                        '6'=1, '7'=1, '8'=1, '9'=1, '10'=1, 
                                                        '11'=1, '12'=1, '13'=1, '14'= 1, '15' =1, 
                                                        '16' =1, '18' =1, '20'=1, '25'=1, '26'=1)) %>%  
         
   mutate(SocialDisparities_3_CTA = recode(SocialDisparities_3_CTA, '88' = 0, 
                                                        '0'=1, '1'=1, '2'=1, '3'=1, '4'=1, '5'=1,
                                                        '6'=1, '7'=1, '8'=1, '9'=1, '10'=1, 
                                                        '11'=1, '12'=1, '13'=1, '14'= 1, '15' =1, 
                                                        '26'=1)) %>% 
   
   mutate(Debunk_4_CTA = recode(Debunk_4_CTA,'88' = 0, 
                                                '0'=1, '1'= 1, '2'=1, '3'=1, '4'=1, '5'=1,
                                                        '6'=1, '7'=1, '8'= 1, '9'= 1, '10'=1, 
                                                        '11'=1, '15' =1)) %>% 
          
  
   mutate(UncertaintyReduction_5_CTA =recode(UncertaintyReduction_5_CTA, '88' = 0, 
                                                        '0'=1, '1'=1, '2'=1,  '3'=1, '4'=1, '5'=1,
                                                        '6'=1, '7'=1, '8'= 1, '9'=1, '10'=1, 
                                                        '11'=1, '12'=1, '13'=1, '14'= 1, '15' =1, 
                                                        '16' =1, '17'= 1, '18' =1, '25'=1, '26'=1)) %>% 
  
     mutate(Testing_6_CTA = recode(Testing_6_CTA, '88' = 0, 
                                                   '0'=1, '1'=1, '2'=1, '3'=1, '4'=1, '5'=1,
                                                    '6'=1, '7'=1, '8'=1, '9'=1, '10'=1, 
                                                    '11'=1, '12'=1, '13'=1, '14'= 1, '15' =1, 
                                                    '18' =1, '25'=1, '26'=1)) %>%  
         
      mutate( Vaccine_7_CTA = recode(Vaccine_7_CTA, '88' = 0, 
                                                  '0'=1, '1'=1, '2'=1, '3'=1, '4'=1, '5'=1,
                                                  '6'=1, '7'=1, '8'=1, '9'=1, '15' =1)) %>% 
  mutate( Action_13_CTA = recode(Action_13_CTA, '88' = 0, 
                                                  '0'=1, '1'=1, '2'=1, '3'=1, '4'=1, '5'=1,
                                                  '6'=1, '7'=1, '8'=1, '9'=1, '15' =1,  '16' =1, '18' =1, 
                                                  '25'=1, '26'=1))

p1 
## # A tibble: 9,867 × 32
##    Post_oldid Real_ID date     COVID_Post RiskFactor_2_CTA SocialDisparities_3_…
##    <chr>        <dbl> <chr>         <dbl>            <dbl>                 <dbl>
##  1 1             2069 9/22/20           1                0                     0
##  2 2             2070 8/27/20           1                0                     0
##  3 3             2071 12/29/20          1                0                     0
##  4 4             2072 9/29/20           1                0                     0
##  5 5             2073 10/6/20           1                0                     0
##  6 6             2074 12/31/20          1                0                     0
##  7 7              403 4/2/20            1                0                     0
##  8 8             5425 12/1/20           1                0                     0
##  9 9             5842 12/20/20          1                0                     0
## 10 10            2075 3/5/20            1                0                     0
## # … with 9,857 more rows, and 26 more variables: Debunk_4_CTA <dbl>,
## #   UncertaintyReduction_5_CTA <dbl>, Testing_6_CTA <dbl>, Vaccine_7_CTA <dbl>,
## #   Mental_8_YesNo <dbl>, Emotion_9_Number <dbl>, Praise_10_Number <dbl>,
## #   Pop_11_Number <dbl>, Language_12_Number <dbl>, Action_13_CTA <dbl>,
## #   Positive_14a_Number <dbl>, Negative_14b_Number <dbl>,
## #   Individual_14c_Number <dbl>, Collective_14d_Number <dbl>,
## #   `State_ recode` <dbl>, Gov_poli <dbl>, Trifecta <dbl>, …
table(p1$Action_13_CTA)
## 
##    0    1   10   11   12   13   14   17 
##   65 9705   62   23    3    4    4    1
table(p1$Positive_14a_Number)
## 
##    0    1    2    3    4    5    6    7    8 
## 5875 2563  949  289  124   35   20    7    5
table(p1$Negative_14b_Number)
## 
##    0    1    2    3    5    6 
## 9728   99   27   10    2    1
table(p1$Individual_14c_Number)
## 
##    0    1    2    3    4    5    6    7 
## 8523 1078  171   35   49    7    2    2
table(p1$Collective_14d_Number)
## 
##    0    1    2    3    4    5    6    7    8 
## 6635 2315  622  186   64   24   13    5    3
p2 <- p1 %>% 
  select(-"Mental_8_YesNo", 
         -"Emotion_9_Number", 
         - "Praise_10_Number", 
         -"Pop_11_Number", 
         -"Language_12_Number") %>% 
  mutate(efficacy_total = Individual_14c_Number + Collective_14d_Number) %>% 
  mutate(efficacy_total1 = Negative_14b_Number + Positive_14a_Number) %>%
  mutate(Gov_poli = factor(Gov_poli, levels = c(1,2), labels = c("Republican", "Democratic"))) %>% 
  mutate(Trifecta = factor(Trifecta, levels = c(1,2,3), labels = c("Republican", "Democratic", "Mixture")))
p2
## # A tibble: 9,867 × 29
##    Post_oldid Real_ID date     COVID_Post RiskFactor_2_CTA SocialDisparities_3_…
##    <chr>        <dbl> <chr>         <dbl>            <dbl>                 <dbl>
##  1 1             2069 9/22/20           1                0                     0
##  2 2             2070 8/27/20           1                0                     0
##  3 3             2071 12/29/20          1                0                     0
##  4 4             2072 9/29/20           1                0                     0
##  5 5             2073 10/6/20           1                0                     0
##  6 6             2074 12/31/20          1                0                     0
##  7 7              403 4/2/20            1                0                     0
##  8 8             5425 12/1/20           1                0                     0
##  9 9             5842 12/20/20          1                0                     0
## 10 10            2075 3/5/20            1                0                     0
## # … with 9,857 more rows, and 23 more variables: Debunk_4_CTA <dbl>,
## #   UncertaintyReduction_5_CTA <dbl>, Testing_6_CTA <dbl>, Vaccine_7_CTA <dbl>,
## #   Action_13_CTA <dbl>, Positive_14a_Number <dbl>, Negative_14b_Number <dbl>,
## #   Individual_14c_Number <dbl>, Collective_14d_Number <dbl>,
## #   `State_ recode` <dbl>, Gov_poli <fct>, Trifecta <fct>,
## #   `White_\bpercent` <dbl>, minority_percent <dbl>, Poverty_percent <dbl>,
## #   ProspertiyRanking <dbl>, year <dbl>, month <dbl>, day <dbl>, state <chr>, …
levels(p2$Gov_poli)
## [1] "Republican" "Democratic"
ggplot(p2, aes(Action_13_CTA , fill = RiskFactor_2_CTA)) +
  geom_histogram() +
  scale_x_log10() +
  facet_grid(RiskFactor_2_CTA ~ ., margins=TRUE, scales="free_y")
## Warning: Transformation introduced infinite values in continuous x-axis
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## Warning: Removed 130 rows containing non-finite values (`stat_bin()`).

ggplot(p2, aes(Positive_14a_Number , fill = SocialDisparities_3_CTA)) +
  geom_histogram() +
  scale_x_log10() +
  facet_grid(SocialDisparities_3_CTA ~ ., margins=TRUE, scales="free_y")
## Warning: Transformation introduced infinite values in continuous x-axis
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## Warning: Removed 11750 rows containing non-finite values (`stat_bin()`).

ggplot(p2, aes(Negative_14b_Number, fill = RiskFactor_2_CTA)) +
  geom_histogram() +
  scale_x_log10() +
  facet_grid(RiskFactor_2_CTA ~ ., margins=TRUE, scales="free_y")
## Warning: Transformation introduced infinite values in continuous x-axis
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## Warning: Removed 19456 rows containing non-finite values (`stat_bin()`).

ggplot(p2, aes(Individual_14c_Number, fill = RiskFactor_2_CTA)) +
  geom_histogram() +
  scale_x_log10() +
  facet_grid(RiskFactor_2_CTA ~ ., margins=TRUE, scales="free_y")
## Warning: Transformation introduced infinite values in continuous x-axis
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
## Warning: Removed 17046 rows containing non-finite values (`stat_bin()`).

library("dplyr")
library("ggpubr")
ggdensity(p2$Action_13_CTA, 
          main = "Density plot of Action_13_CTA",
          xlab = "Individual_Action_13_CTA")

library("dplyr")
library("ggpubr")
ggdensity(p2$Positive_14a_Number, 
          main = "Density plot of Positive_14a_Number",
          xlab = "Individual_Positive_14a_Number")

library("dplyr")
library("ggpubr")
ggdensity(p2$Negative_14b_Number, 
          main = "Negative_14b_Number",
          xlab = "Negative_14b_Number")

library("dplyr")
library("ggpubr")
ggdensity(p2$Individual_14c_Number, 
          main = "Density plot of Individual_14c_Number",
          xlab = "Individual_14c_Number")

library("dplyr")
library("ggpubr")
ggdensity(p2$Collective_14d_Number, 
          main = "Density plot of collective efficacy",
          xlab = "Collective efficacy")

library("dplyr")
library("ggpubr")
ggdensity(p2$minority_percent, 
          main = "Density plot of minority_percent",
          xlab = "minority_percent")

minority_percent Poverty_percent

library("dplyr")
library("ggpubr")
ggdensity(p2$Poverty_percent, 
          main = "Density plot of Poverty_percent",
          xlab = "Poverty_percent")

summary(p1)
##   Post_oldid           Real_ID         date             COVID_Post
##  Length:9867        Min.   :   1   Length:9867        Min.   :1   
##  Class :character   1st Qu.:2468   Class :character   1st Qu.:1   
##  Mode  :character   Median :4935   Mode  :character   Median :1   
##                     Mean   :4935                      Mean   :1   
##                     3rd Qu.:7402                      3rd Qu.:1   
##                     Max.   :9868                      Max.   :1   
##                                                                   
##  RiskFactor_2_CTA SocialDisparities_3_CTA  Debunk_4_CTA    
##  Min.   :0.0000   Min.   :0.00000         Min.   :0.00000  
##  1st Qu.:0.0000   1st Qu.:0.00000         1st Qu.:0.00000  
##  Median :0.0000   Median :0.00000         Median :0.00000  
##  Mean   :0.1361   Mean   :0.01784         Mean   :0.04409  
##  3rd Qu.:0.0000   3rd Qu.:0.00000         3rd Qu.:0.00000  
##  Max.   :1.0000   Max.   :1.00000         Max.   :1.00000  
##                                                            
##  UncertaintyReduction_5_CTA Testing_6_CTA    Vaccine_7_CTA    
##  Min.   :0.0000             Min.   :0.0000   Min.   :0.00000  
##  1st Qu.:1.0000             1st Qu.:0.0000   1st Qu.:0.00000  
##  Median :1.0000             Median :0.0000   Median :0.00000  
##  Mean   :0.9516             Mean   :0.1716   Mean   :0.09142  
##  3rd Qu.:1.0000             3rd Qu.:0.0000   3rd Qu.:0.00000  
##  Max.   :1.0000             Max.   :1.0000   Max.   :1.00000  
##                                                               
##  Mental_8_YesNo    Emotion_9_Number  Praise_10_Number  Pop_11_Number    
##  Min.   :0.00000   Min.   :0.00000   Min.   :0.00000   Min.   : 0.0000  
##  1st Qu.:0.00000   1st Qu.:0.00000   1st Qu.:0.00000   1st Qu.: 0.0000  
##  Median :0.00000   Median :0.00000   Median :0.00000   Median : 0.0000  
##  Mean   :0.01824   Mean   :0.02017   Mean   :0.04267   Mean   : 0.1493  
##  3rd Qu.:0.00000   3rd Qu.:0.00000   3rd Qu.:0.00000   3rd Qu.: 0.0000  
##  Max.   :1.00000   Max.   :6.00000   Max.   :8.00000   Max.   :13.0000  
##                                                                         
##  Language_12_Number Action_13_CTA    Positive_14a_Number Negative_14b_Number
##  Min.   :0.0000     Min.   : 0.000   Min.   :0.0000      Min.   :0.00000    
##  1st Qu.:0.0000     1st Qu.: 1.000   1st Qu.:0.0000      1st Qu.:0.00000    
##  Median :0.0000     Median : 1.000   Median :0.0000      Median :0.00000    
##  Mean   :0.0824     Mean   : 1.088   Mean   :0.6292      Mean   :0.02017    
##  3rd Qu.:0.0000     3rd Qu.: 1.000   3rd Qu.:1.0000      3rd Qu.:0.00000    
##  Max.   :6.0000     Max.   :17.000   Max.   :8.0000      Max.   :6.00000    
##                                                                             
##  Individual_14c_Number Collective_14d_Number State_ recode      Gov_poli    
##  Min.   :0.0000        Min.   :0.0000        Min.   : 1.00   Min.   :1.000  
##  1st Qu.:0.0000        1st Qu.:0.0000        1st Qu.: 5.00   1st Qu.:1.000  
##  Median :0.0000        Median :0.0000        Median :13.00   Median :1.000  
##  Mean   :0.1806        Mean   :0.4692        Mean   :20.78   Mean   :1.486  
##  3rd Qu.:0.0000        3rd Qu.:1.0000        3rd Qu.:34.00   3rd Qu.:2.000  
##  Max.   :7.0000        Max.   :8.0000        Max.   :51.00   Max.   :2.000  
##                                                                             
##     Trifecta     White_\bpercent minority_percent Poverty_percent
##  Min.   :1.000   Min.   :21.70   Min.   : 7.40    Min.   : 7.50  
##  1st Qu.:1.000   1st Qu.:53.20   1st Qu.:24.30    1st Qu.:10.40  
##  Median :2.000   Median :65.30   Median :34.70    Median :12.00  
##  Mean   :1.677   Mean   :62.74   Mean   :37.24    Mean   :12.62  
##  3rd Qu.:2.000   3rd Qu.:75.70   3rd Qu.:46.80    3rd Qu.:14.10  
##  Max.   :3.000   Max.   :92.60   Max.   :78.30    Max.   :18.80  
##                                                                  
##  ProspertiyRanking      year          month             day       
##  Min.   : 2.00     Min.   :2020   Min.   : 1.000   Min.   : 1.00  
##  1st Qu.:11.00     1st Qu.:2020   1st Qu.: 5.000   1st Qu.: 9.00  
##  Median :28.00     Median :2020   Median : 9.000   Median :17.00  
##  Mean   :27.73     Mean   :2020   Mean   : 8.152   Mean   :16.32  
##  3rd Qu.:41.00     3rd Qu.:2020   3rd Qu.:12.000   3rd Qu.:24.00  
##  Max.   :51.00     Max.   :2020   Max.   :12.000   Max.   :31.00  
##                                                                   
##     state               cases      
##  Length:9867        Min.   :    0  
##  Class :character   1st Qu.:  121  
##  Mode  :character   Median :  583  
##                     Mean   : 2011  
##                     3rd Qu.: 2208  
##                     Max.   :64986  
##                     NA's   :422

z-test efficacy positive - negative

#https://rpubs.com/nguyenminhsang/two-sample_z-test

# Set difference to be tested
d0<-0
d0
## [1] 0
# Set standard deviation of sample with status 0
sigma0<-sd(p1$Positive_14a_Number)
sigma0
## [1] 0.9706897
# Set standard deviation of sample with status 1
sigma1<-sd(p1$Negative_14b_Number)
sigma1
## [1] 0.1959933
#Calculate the two means 
 mean_positive <- mean(p1$Positive_14a_Number)
 mean_positive
## [1] 0.6291679
 mean_negative <- mean(p1$Negative_14b_Number)
 mean_negative
## [1] 0.02016824
 #Calculate the two lengths
n_positive<-length(p1$Positive_14a_Number)
n_positive
## [1] 9867
n_negative<-length(p1$Negative_14b_Number)
n_negative
## [1] 9867
# Calculate test statistic and two-sided p-value

z<-((mean_positive- mean_negative)-d0)/
  sqrt(sigma0^2/n_positive+
         sigma1^2/n_negative)
z
## [1] 61.08748
p_value=2*pnorm(-abs(z))
p_value
## [1] 0

###RQ1: To what extent do state health departments use self-efficacy statements (Q14 a vs Q14b AND Q14c vs. Q14d) in their Facebook posts between Jan-Dec, 2020?

z-test efficacy positive - negative

# Set difference to be tested
d1_0<-0
d1_0
## [1] 0
# Set standard deviation of sample with status 0
sigma1_0<-sd(p1$Individual_14c_Number)
sigma1_0
## [1] 0.5406792
# Set standard deviation of sample with status 1
sigma1_1<-sd(p1$Collective_14d_Number)
sigma1_1
## [1] 0.8322395
#Calculate the two means 
 mean_individual <- mean(p1$Individual_14c_Number)
 mean_individual 
## [1] 0.180602
 mean_collective <- mean(p1$Collective_14d_Number)
 mean_collective
## [1] 0.4692409
 #Calculate the two lengths
n_individual <-length(p1$Individual_14c_Number)
n_individual 
## [1] 9867
n_collective<-length(p1$Collective_14d_Number)
n_collective
## [1] 9867
# Calculate test statistic and two-sided p-value

z1 <-((mean_individual-mean_collective)-d1_0)/
  sqrt(sigma1_0^2/n_individual + 
         sigma1_1^2/n_collective)
z1
## [1] -28.88942
p_value1 =2*pnorm(-abs(z))
p_value1 
## [1] 0

###RQ3: How do self-efficacy statements in posts differ between states governed by Democrat and Republican governors?

#fit0 <- t.test(
#  formula = efficacy_total1 ~ Gov_poli, 
#  data = p2, 
#  paired = FALSE, 
 # var.equal = TRUE)
#(fit0)
#library(parameters)
#model_parameters(fit0)
fit <- t.test(
  formula = efficacy_total ~ Gov_poli, 
  data = p2, 
  paired = FALSE, 
  var.equal = FALSE
)
(fit)
## 
##  Welch Two Sample t-test
## 
## data:  efficacy_total by Gov_poli
## t = 0.51893, df = 9828.2, p-value = 0.6038
## alternative hypothesis: true difference in means between group Republican and group Democratic is not equal to 0
## 95 percent confidence interval:
##  -0.02889909  0.04970910
## sample estimates:
## mean in group Republican mean in group Democratic 
##                0.6549004                0.6444954
library(parameters)
model_parameters(fit)
## Welch Two Sample t-test
## 
## Parameter      |    Group | Gov_poli = Republican | Gov_poli = Democratic | Difference |        95% CI | t(9828.17) |     p
## ---------------------------------------------------------------------------------------------------------------------------
## efficacy_total | Gov_poli |                  0.65 |                  0.64 |       0.01 | [-0.03, 0.05] |       0.52 | 0.604
## 
## Alternative hypothesis: true difference in means between group Republican and group Democratic is not equal to 0
fit1 <- t.test(
  formula = Positive_14a_Number ~ Gov_poli, 
  data = p2, 
  paired = FALSE, 
  var.equal = FALSE
)
(fit1)
## 
##  Welch Two Sample t-test
## 
## data:  Positive_14a_Number by Gov_poli
## t = 1.1311, df = 9846.1, p-value = 0.2581
## alternative hypothesis: true difference in means between group Republican and group Democratic is not equal to 0
## 95 percent confidence interval:
##  -0.01620549  0.06041895
## sample estimates:
## mean in group Republican mean in group Democratic 
##                0.6399132                0.6178065
library(parameters)
model_parameters(fit1)
## Welch Two Sample t-test
## 
## Parameter           |    Group | Gov_poli = Republican | Gov_poli = Democratic | Difference |        95% CI | t(9846.09) |     p
## --------------------------------------------------------------------------------------------------------------------------------
## Positive_14a_Number | Gov_poli |                  0.64 |                  0.62 |       0.02 | [-0.02, 0.06] |       1.13 | 0.258
## 
## Alternative hypothesis: true difference in means between group Republican and group Democratic is not equal to 0
fit2 <- t.test(
  formula = Negative_14b_Number ~ Gov_poli, 
  data = p2, 
  paired = FALSE, 
  var.equal = FALSE
)
(fit2)
## 
##  Welch Two Sample t-test
## 
## data:  Negative_14b_Number by Gov_poli
## t = -3.1853, df = 8559.1, p-value = 0.001451
## alternative hypothesis: true difference in means between group Republican and group Democratic is not equal to 0
## 95 percent confidence interval:
##  -0.020495816 -0.004879633
## sample estimates:
## mean in group Republican mean in group Democratic 
##               0.01400118               0.02668891
library(parameters)
model_parameters(fit2)
## Welch Two Sample t-test
## 
## Parameter           |    Group | Gov_poli = Republican | Gov_poli = Democratic | Difference |         95% CI | t(8559.06) |     p
## ---------------------------------------------------------------------------------------------------------------------------------
## Negative_14b_Number | Gov_poli |                  0.01 |                  0.03 |      -0.01 | [-0.02,  0.00] |      -3.19 | 0.001
## 
## Alternative hypothesis: true difference in means between group Republican and group Democratic is not equal to 0
fit3 <- t.test(
  formula = Individual_14c_Number ~ Gov_poli, 
  data = p2, 
  paired = FALSE, 
  var.equal = FALSE
)
(fit3)
## 
##  Welch Two Sample t-test
## 
## data:  Individual_14c_Number by Gov_poli
## t = 2.9207, df = 9850.9, p-value = 0.0035
## alternative hypothesis: true difference in means between group Republican and group Democratic is not equal to 0
## 95 percent confidence interval:
##  0.01042905 0.05299690
## sample estimates:
## mean in group Republican mean in group Democratic 
##                0.1960166                0.1643036
library(parameters)
model_parameters(fit3)
## Welch Two Sample t-test
## 
## Parameter             |    Group | Gov_poli = Republican | Gov_poli = Democratic | Difference |       95% CI | t(9850.88) |     p
## ---------------------------------------------------------------------------------------------------------------------------------
## Individual_14c_Number | Gov_poli |                  0.20 |                  0.16 |       0.03 | [0.01, 0.05] |       2.92 | 0.004
## 
## Alternative hypothesis: true difference in means between group Republican and group Democratic is not equal to 0
fit4 <- t.test(
  formula = Collective_14d_Number ~ Gov_poli, 
  data = p2, 
  paired = FALSE, 
  var.equal = FALSE
)
(fit1)
## 
##  Welch Two Sample t-test
## 
## data:  Positive_14a_Number by Gov_poli
## t = 1.1311, df = 9846.1, p-value = 0.2581
## alternative hypothesis: true difference in means between group Republican and group Democratic is not equal to 0
## 95 percent confidence interval:
##  -0.01620549  0.06041895
## sample estimates:
## mean in group Republican mean in group Democratic 
##                0.6399132                0.6178065
library(parameters)
model_parameters(fit4)
## Welch Two Sample t-test
## 
## Parameter             |    Group | Gov_poli = Republican | Gov_poli = Democratic | Difference |        95% CI | t(9813.00) |     p
## ----------------------------------------------------------------------------------------------------------------------------------
## Collective_14d_Number | Gov_poli |                  0.46 |                  0.48 |      -0.02 | [-0.05, 0.01] |      -1.27 | 0.204
## 
## Alternative hypothesis: true difference in means between group Republican and group Democratic is not equal to 0
library(effectsize)
cohens_d(fit)
## Warning in .effectsize_t.test(model, type = type, verbose = verbose, ...):
## Unable to retrieve data from htest object. Using t_to_d() approximation.
## d    |        95% CI
## --------------------
## 0.01 | [-0.03, 0.05]
cohens_d(fit1)
## Warning in .effectsize_t.test(model, type = type, verbose = verbose, ...):
## Unable to retrieve data from htest object. Using t_to_d() approximation.
## d    |        95% CI
## --------------------
## 0.02 | [-0.02, 0.06]
cohens_d(fit2)
## Warning in .effectsize_t.test(model, type = type, verbose = verbose, ...):
## Unable to retrieve data from htest object. Using t_to_d() approximation.
## d     |         95% CI
## ----------------------
## -0.07 | [-0.11, -0.03]
cohens_d(fit3)
## Warning in .effectsize_t.test(model, type = type, verbose = verbose, ...):
## Unable to retrieve data from htest object. Using t_to_d() approximation.
## d    |       95% CI
## -------------------
## 0.06 | [0.02, 0.10]
cohens_d(fit4)
## Warning in .effectsize_t.test(model, type = type, verbose = verbose, ...):
## Unable to retrieve data from htest object. Using t_to_d() approximation.
## d     |        95% CI
## ---------------------
## -0.03 | [-0.07, 0.01]

###RQ4: How do self-efficacy statements in posts differ between states governed by Democrat and Republican states?

colnames(p2)
##  [1] "Post_oldid"                 "Real_ID"                   
##  [3] "date"                       "COVID_Post"                
##  [5] "RiskFactor_2_CTA"           "SocialDisparities_3_CTA"   
##  [7] "Debunk_4_CTA"               "UncertaintyReduction_5_CTA"
##  [9] "Testing_6_CTA"              "Vaccine_7_CTA"             
## [11] "Action_13_CTA"              "Positive_14a_Number"       
## [13] "Negative_14b_Number"        "Individual_14c_Number"     
## [15] "Collective_14d_Number"      "State_ recode"             
## [17] "Gov_poli"                   "Trifecta"                  
## [19] "White_\bpercent"            "minority_percent"          
## [21] "Poverty_percent"            "ProspertiyRanking"         
## [23] "year"                       "month"                     
## [25] "day"                        "state"                     
## [27] "cases"                      "efficacy_total"            
## [29] "efficacy_total1"
levels(p2$Trifecta)
## [1] "Republican" "Democratic" "Mixture"
fit_0 <- aov(formula = efficacy_total ~ Trifecta, data = p2)
summary(fit_0)
##               Df Sum Sq Mean Sq F value Pr(>F)  
## Trifecta       2      8   3.892   3.931 0.0196 *
## Residuals   9864   9765   0.990                 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
model_parameters(fit_0)
## Parameter | Sum_Squares |   df | Mean_Square |    F |     p
## -----------------------------------------------------------
## Trifecta  |        7.78 |    2 |        3.89 | 3.93 | 0.020
## Residuals |     9765.42 | 9864 |        0.99 |      |      
## 
## Anova Table (Type 1 tests)
library(ggeffects)
gge_0 <- ggeffect(fit_0, "Trifecta")
## Package `effects` is not available, but needed for `ggeffect()`. Either install package `effects`, or use `ggpredict()`. Calling `ggpredict()` now.FALSE
gge_0
## # Predicted values of efficacy_total
## 
## Trifecta   | Predicted |       95% CI
## -------------------------------------
## Republican |      0.64 | [0.61, 0.66]
## Democratic |      0.64 | [0.61, 0.67]
## Mixture    |      0.72 | [0.67, 0.77]
plot(gge_0, connect.lines = TRUE)

fit_1 <- aov(formula = Positive_14a_Number ~ Trifecta, data = p2)
summary(fit_1)
##               Df Sum Sq Mean Sq F value Pr(>F)  
## Trifecta       2      6  2.9686   3.152 0.0428 *
## Residuals   9864   9290  0.9418                 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
model_parameters(fit_1)
## Parameter | Sum_Squares |   df | Mean_Square |    F |     p
## -----------------------------------------------------------
## Trifecta  |        5.94 |    2 |        2.97 | 3.15 | 0.043
## Residuals |     9290.19 | 9864 |        0.94 |      |      
## 
## Anova Table (Type 1 tests)
gge_1 <- ggeffect(fit_1, "Trifecta")
## Package `effects` is not available, but needed for `ggeffect()`. Either install package `effects`, or use `ggpredict()`. Calling `ggpredict()` now.FALSE
gge_1
## # Predicted values of Positive_14a_Number
## 
## Trifecta   | Predicted |       95% CI
## -------------------------------------
## Republican |      0.62 | [0.60, 0.65]
## Democratic |      0.61 | [0.58, 0.64]
## Mixture    |      0.69 | [0.64, 0.74]
plot(gge_1, connect.lines = TRUE)

fit_2 <- aov(formula = Negative_14b_Number ~ Trifecta, data = p2)
summary(fit_2)
##               Df Sum Sq Mean Sq F value   Pr(>F)    
## Trifecta       2    0.9  0.4377   11.42 1.11e-05 ***
## Residuals   9864  378.1  0.0383                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
model_parameters(fit_2)
## Parameter | Sum_Squares |   df | Mean_Square |     F |      p
## -------------------------------------------------------------
## Trifecta  |        0.88 |    2 |        0.44 | 11.42 | < .001
## Residuals |      378.11 | 9864 |        0.04 |       |       
## 
## Anova Table (Type 1 tests)
gge_2 <- ggeffect(fit_2, "Trifecta")
## Package `effects` is not available, but needed for `ggeffect()`. Either install package `effects`, or use `ggpredict()`. Calling `ggpredict()` now.FALSE
gge_2
## # Predicted values of Negative_14b_Number
## 
## Trifecta   | Predicted |       95% CI
## -------------------------------------
## Republican |      0.01 | [0.00, 0.02]
## Democratic |      0.03 | [0.02, 0.04]
## Mixture    |      0.03 | [0.02, 0.04]
plot(gge_2, connect.lines = TRUE)

fit_3 <- aov(formula = Individual_14c_Number ~ Trifecta, data = p2)
summary(fit_3)
##               Df Sum Sq Mean Sq F value   Pr(>F)    
## Trifecta       2    4.2   2.088   7.153 0.000787 ***
## Residuals   9864 2880.0   0.292                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
model_parameters(fit_3)
## Parameter | Sum_Squares |   df | Mean_Square |    F |      p
## ------------------------------------------------------------
## Trifecta  |        4.18 |    2 |        2.09 | 7.15 | < .001
## Residuals |     2879.99 | 9864 |        0.29 |      |       
## 
## Anova Table (Type 1 tests)
gge_3 <- ggeffect(fit_3, "Trifecta")
## Package `effects` is not available, but needed for `ggeffect()`. Either install package `effects`, or use `ggpredict()`. Calling `ggpredict()` now.FALSE
gge_3
## # Predicted values of Individual_14c_Number
## 
## Trifecta   | Predicted |       95% CI
## -------------------------------------
## Republican |      0.20 | [0.19, 0.22]
## Democratic |      0.16 | [0.14, 0.18]
## Mixture    |      0.16 | [0.14, 0.19]
plot(gge_3, connect.lines = TRUE)

fit_4 <- aov(formula = Collective_14d_Number ~ Trifecta, data = p2)
summary(fit_4)
##               Df Sum Sq Mean Sq F value   Pr(>F)    
## Trifecta       2     17   8.389   12.14 5.43e-06 ***
## Residuals   9864   6817   0.691                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
model_parameters(fit_4)
## Parameter | Sum_Squares |   df | Mean_Square |     F |      p
## -------------------------------------------------------------
## Trifecta  |       16.78 |    2 |        8.39 | 12.14 | < .001
## Residuals |     6816.64 | 9864 |        0.69 |       |       
## 
## Anova Table (Type 1 tests)
gge_4 <- ggeffect(fit_4, "Trifecta")
## Package `effects` is not available, but needed for `ggeffect()`. Either install package `effects`, or use `ggpredict()`. Calling `ggpredict()` now.FALSE
gge_4
## # Predicted values of Collective_14d_Number
## 
## Trifecta   | Predicted |       95% CI
## -------------------------------------
## Republican |      0.43 | [0.41, 0.46]
## Democratic |      0.48 | [0.46, 0.51]
## Mixture    |      0.55 | [0.51, 0.60]
plot(gge_4, connect.lines = TRUE)

RQ5: How does the socio-economic status affect use of individual/collective self-efficacy in health communication messages?

p2 
## # A tibble: 9,867 × 29
##    Post_oldid Real_ID date     COVID_Post RiskFactor_2_CTA SocialDisparities_3_…
##    <chr>        <dbl> <chr>         <dbl>            <dbl>                 <dbl>
##  1 1             2069 9/22/20           1                0                     0
##  2 2             2070 8/27/20           1                0                     0
##  3 3             2071 12/29/20          1                0                     0
##  4 4             2072 9/29/20           1                0                     0
##  5 5             2073 10/6/20           1                0                     0
##  6 6             2074 12/31/20          1                0                     0
##  7 7              403 4/2/20            1                0                     0
##  8 8             5425 12/1/20           1                0                     0
##  9 9             5842 12/20/20          1                0                     0
## 10 10            2075 3/5/20            1                0                     0
## # … with 9,857 more rows, and 23 more variables: Debunk_4_CTA <dbl>,
## #   UncertaintyReduction_5_CTA <dbl>, Testing_6_CTA <dbl>, Vaccine_7_CTA <dbl>,
## #   Action_13_CTA <dbl>, Positive_14a_Number <dbl>, Negative_14b_Number <dbl>,
## #   Individual_14c_Number <dbl>, Collective_14d_Number <dbl>,
## #   `State_ recode` <dbl>, Gov_poli <fct>, Trifecta <fct>,
## #   `White_\bpercent` <dbl>, minority_percent <dbl>, Poverty_percent <dbl>,
## #   ProspertiyRanking <dbl>, year <dbl>, month <dbl>, day <dbl>, state <chr>, …
colnames(p2)
##  [1] "Post_oldid"                 "Real_ID"                   
##  [3] "date"                       "COVID_Post"                
##  [5] "RiskFactor_2_CTA"           "SocialDisparities_3_CTA"   
##  [7] "Debunk_4_CTA"               "UncertaintyReduction_5_CTA"
##  [9] "Testing_6_CTA"              "Vaccine_7_CTA"             
## [11] "Action_13_CTA"              "Positive_14a_Number"       
## [13] "Negative_14b_Number"        "Individual_14c_Number"     
## [15] "Collective_14d_Number"      "State_ recode"             
## [17] "Gov_poli"                   "Trifecta"                  
## [19] "White_\bpercent"            "minority_percent"          
## [21] "Poverty_percent"            "ProspertiyRanking"         
## [23] "year"                       "month"                     
## [25] "day"                        "state"                     
## [27] "cases"                      "efficacy_total"            
## [29] "efficacy_total1"
p3 <-p2 %>% 
  rename( White_percent = "White_\bpercent") %>% 

  select(minority_percent, Poverty_percent, Positive_14a_Number, Negative_14b_Number, Individual_14c_Number, Collective_14d_Number, efficacy_total)
p3
## # A tibble: 9,867 × 7
##    minority_percent Poverty_percent Positive_14a_Number Negative_14b_Number
##               <dbl>           <dbl>               <dbl>               <dbl>
##  1             63.5            11.8                   0                   0
##  2             63.5            11.8                   0                   0
##  3             63.5            11.8                   0                   0
##  4             63.5            11.8                   0                   0
##  5             63.5            11.8                   0                   0
##  6             63.5            11.8                   0                   0
##  7             39.8            10.2                   0                   0
##  8             45.4             9.1                   0                   0
##  9             28.6            11.6                   0                   0
## 10             63.5            11.8                   1                   0
## # … with 9,857 more rows, and 3 more variables: Individual_14c_Number <dbl>,
## #   Collective_14d_Number <dbl>, efficacy_total <dbl>
library(correlation)
correlation(p3)
## # Correlation Matrix (pearson-method)
## 
## Parameter1            |            Parameter2 |        r |         95% CI | t(9865) |         p
## -----------------------------------------------------------------------------------------------
## minority_percent      |       Poverty_percent |     0.32 | [ 0.30,  0.34] |   33.62 | < .001***
## minority_percent      |   Positive_14a_Number |     0.08 | [ 0.06,  0.10] |    8.20 | < .001***
## minority_percent      |   Negative_14b_Number |     0.02 | [ 0.00,  0.04] |    2.33 | 0.100    
## minority_percent      | Individual_14c_Number |    -0.02 | [-0.04,  0.00] |   -1.94 | 0.157    
## minority_percent      | Collective_14d_Number |     0.12 | [ 0.10,  0.13] |   11.52 | < .001***
## minority_percent      |        efficacy_total |     0.09 | [ 0.07,  0.11] |    8.54 | < .001***
## Poverty_percent       |   Positive_14a_Number |    -0.04 | [-0.05, -0.02] |   -3.49 | 0.004**  
## Poverty_percent       |   Negative_14b_Number |    -0.02 | [-0.04,  0.00] |   -1.90 | 0.157    
## Poverty_percent       | Individual_14c_Number |    -0.02 | [-0.04,  0.00] |   -2.20 | 0.113    
## Poverty_percent       | Collective_14d_Number |    -0.03 | [-0.05, -0.01] |   -3.18 | 0.010*   
## Poverty_percent       |        efficacy_total |    -0.04 | [-0.06, -0.02] |   -3.85 | 0.001**  
## Positive_14a_Number   |   Negative_14b_Number |     0.02 | [ 0.01,  0.04] |    2.48 | 0.080    
## Positive_14a_Number   | Individual_14c_Number |     0.52 | [ 0.50,  0.53] |   60.01 | < .001***
## Positive_14a_Number   | Collective_14d_Number |     0.83 | [ 0.83,  0.84] |  149.60 | < .001***
## Positive_14a_Number   |        efficacy_total |     0.98 | [ 0.98,  0.98] |  460.89 | < .001***
## Negative_14b_Number   | Individual_14c_Number |     0.21 | [ 0.19,  0.23] |   21.49 | < .001***
## Negative_14b_Number   | Collective_14d_Number |     0.13 | [ 0.11,  0.15] |   12.73 | < .001***
## Negative_14b_Number   |        efficacy_total |     0.22 | [ 0.20,  0.24] |   22.53 | < .001***
## Individual_14c_Number | Collective_14d_Number | 6.26e-03 | [-0.01,  0.03] |    0.62 | 0.534    
## Individual_14c_Number |        efficacy_total |     0.55 | [ 0.53,  0.56] |   65.15 | < .001***
## Collective_14d_Number |        efficacy_total |     0.84 | [ 0.83,  0.85] |  153.51 | < .001***
## 
## p-value adjustment method: Holm (1979)
## Observations: 9867
rmat <- correlation(p3)
plot(summary(rmat))

###RQ6: To what extent do state health departments use call to action in relations to risk (Q2, 3,4,5,6,7)?

p2
## # A tibble: 9,867 × 29
##    Post_oldid Real_ID date     COVID_Post RiskFactor_2_CTA SocialDisparities_3_…
##    <chr>        <dbl> <chr>         <dbl>            <dbl>                 <dbl>
##  1 1             2069 9/22/20           1                0                     0
##  2 2             2070 8/27/20           1                0                     0
##  3 3             2071 12/29/20          1                0                     0
##  4 4             2072 9/29/20           1                0                     0
##  5 5             2073 10/6/20           1                0                     0
##  6 6             2074 12/31/20          1                0                     0
##  7 7              403 4/2/20            1                0                     0
##  8 8             5425 12/1/20           1                0                     0
##  9 9             5842 12/20/20          1                0                     0
## 10 10            2075 3/5/20            1                0                     0
## # … with 9,857 more rows, and 23 more variables: Debunk_4_CTA <dbl>,
## #   UncertaintyReduction_5_CTA <dbl>, Testing_6_CTA <dbl>, Vaccine_7_CTA <dbl>,
## #   Action_13_CTA <dbl>, Positive_14a_Number <dbl>, Negative_14b_Number <dbl>,
## #   Individual_14c_Number <dbl>, Collective_14d_Number <dbl>,
## #   `State_ recode` <dbl>, Gov_poli <fct>, Trifecta <fct>,
## #   `White_\bpercent` <dbl>, minority_percent <dbl>, Poverty_percent <dbl>,
## #   ProspertiyRanking <dbl>, year <dbl>, month <dbl>, day <dbl>, state <chr>, …
colnames(p2)
##  [1] "Post_oldid"                 "Real_ID"                   
##  [3] "date"                       "COVID_Post"                
##  [5] "RiskFactor_2_CTA"           "SocialDisparities_3_CTA"   
##  [7] "Debunk_4_CTA"               "UncertaintyReduction_5_CTA"
##  [9] "Testing_6_CTA"              "Vaccine_7_CTA"             
## [11] "Action_13_CTA"              "Positive_14a_Number"       
## [13] "Negative_14b_Number"        "Individual_14c_Number"     
## [15] "Collective_14d_Number"      "State_ recode"             
## [17] "Gov_poli"                   "Trifecta"                  
## [19] "White_\bpercent"            "minority_percent"          
## [21] "Poverty_percent"            "ProspertiyRanking"         
## [23] "year"                       "month"                     
## [25] "day"                        "state"                     
## [27] "cases"                      "efficacy_total"            
## [29] "efficacy_total1"
p2$RiskFactor_2_CTA
##    [1] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 1 0 1 0 0 0
##   [38] 0 0 0 0 0 0 1 0 1 0 1 1 0 1 0 1 0 1 1 0 1 1 1 0 1 1 1 0 0 0 0 0 0 0 0 0 0
##   [75] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0
##  [112] 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0
##  [149] 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0
##  [186] 0 0 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
##  [223] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
##  [260] 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
##  [297] 0 0 0 0 0 1 0 0 0 1 0 1 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
##  [334] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 1 1 1 0
##  [371] 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 1 1 1 1
##  [408] 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 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1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
## [9473] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
## [9510] 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0
## [9547] 0 1 0 0 0 0 1 1 1 1 1 0 1 0 0 0 0 0 1 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0
## [9584] 0 1 1 1 1 1 0 1 0 1 0 0 1 1 0 0 0 1 0 0 0 1 1 0 1 0 0 0 0 0 0 0 0 1 0 0 0
## [9621] 1 0 0 0 1 1 1 0 0 0 1 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0
## [9658] 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0
## [9695] 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 1 1 1 1 1 0 0 1 1 0 0 1
## [9732] 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
## [9769] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
## [9806] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
## [9843] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
fita_0 <- t.test(
  formula = Action_13_CTA ~ RiskFactor_2_CTA, 
  data = p2, 
  paired = FALSE, 
  var.equal = FALSE
)
fita_0
## 
##  Welch Two Sample t-test
## 
## data:  Action_13_CTA by RiskFactor_2_CTA
## t = -4.451, df = 1455.6, p-value = 9.198e-06
## alternative hypothesis: true difference in means between group 0 and group 1 is not equal to 0
## 95 percent confidence interval:
##  -0.2847528 -0.1105429
## sample estimates:
## mean in group 0 mean in group 1 
##        1.061473        1.259121
library(parameters)
model_parameters(fita_0)
## Welch Two Sample t-test
## 
## Parameter     |            Group | RiskFactor_2_CTA = 0 | RiskFactor_2_CTA = 1 | Difference |         95% CI | t(1455.63) |      p
## ----------------------------------------------------------------------------------------------------------------------------------
## Action_13_CTA | RiskFactor_2_CTA |                 1.06 |                 1.26 |      -0.20 | [-0.28, -0.11] |      -4.45 | < .001
## 
## Alternative hypothesis: true difference in means between group 0 and group 1 is not equal to 0
fita_1 <- t.test(
  formula = Action_13_CTA ~ SocialDisparities_3_CTA, 
  data = p2, 
  paired = FALSE, 
  var.equal = FALSE
)
fita_1
## 
##  Welch Two Sample t-test
## 
## data:  Action_13_CTA by SocialDisparities_3_CTA
## t = 0.55721, df = 185.64, p-value = 0.5781
## alternative hypothesis: true difference in means between group 0 and group 1 is not equal to 0
## 95 percent confidence interval:
##  -0.08162854  0.14588920
## sample estimates:
## mean in group 0 mean in group 1 
##        1.088949        1.056818
model_parameters(fita_1)
## Welch Two Sample t-test
## 
## Parameter     |                   Group | SocialDisparities_3_CTA = 0 | SocialDisparities_3_CTA = 1 | Difference |        95% CI | t(185.64) |     p
## ----------------------------------------------------------------------------------------------------------------------------------------------------
## Action_13_CTA | SocialDisparities_3_CTA |                        1.09 |                        1.06 |       0.03 | [-0.08, 0.15] |      0.56 | 0.578
## 
## Alternative hypothesis: true difference in means between group 0 and group 1 is not equal to 0
fita_2 <- t.test(
  formula = Action_13_CTA ~ Debunk_4_CTA, 
  data = p2, 
  paired = FALSE, 
  var.equal = FALSE
)
fita_2
## 
##  Welch Two Sample t-test
## 
## data:  Action_13_CTA by Debunk_4_CTA
## t = 2.9728, df = 610.73, p-value = 0.003067
## alternative hypothesis: true difference in means between group 0 and group 1 is not equal to 0
## 95 percent confidence interval:
##  0.02566369 0.12557055
## sample estimates:
## mean in group 0 mean in group 1 
##        1.091709        1.016092
model_parameters(fita_2)
## Welch Two Sample t-test
## 
## Parameter     |        Group | Debunk_4_CTA = 0 | Debunk_4_CTA = 1 | Difference |       95% CI | t(610.73) |     p
## ------------------------------------------------------------------------------------------------------------------
## Action_13_CTA | Debunk_4_CTA |             1.09 |             1.02 |       0.08 | [0.03, 0.13] |      2.97 | 0.003
## 
## Alternative hypothesis: true difference in means between group 0 and group 1 is not equal to 0
fita_3 <- t.test(
  formula = Action_13_CTA ~ UncertaintyReduction_5_CTA, 
  data = p2, 
  paired = FALSE, 
  var.equal = FALSE
)
fita_3
## 
##  Welch Two Sample t-test
## 
## data:  Action_13_CTA by UncertaintyReduction_5_CTA
## t = -5.5825, df = 572.93, p-value = 3.663e-08
## alternative hypothesis: true difference in means between group 0 and group 1 is not equal to 0
## 95 percent confidence interval:
##  -0.2563227 -0.1228997
## sample estimates:
## mean in group 0 mean in group 1 
##       0.9079498       1.0975610
model_parameters(fita_3)
## Welch Two Sample t-test
## 
## Parameter     |                      Group | UncertaintyReduction_5_CTA = 0 | UncertaintyReduction_5_CTA = 1 | Difference |         95% CI | t(572.93) |      p
## ---------------------------------------------------------------------------------------------------------------------------------------------------------------
## Action_13_CTA | UncertaintyReduction_5_CTA |                           0.91 |                           1.10 |      -0.19 | [-0.26, -0.12] |     -5.58 | < .001
## 
## Alternative hypothesis: true difference in means between group 0 and group 1 is not equal to 0
fita_5 <- t.test(
  formula = Action_13_CTA ~ Testing_6_CTA, 
  data = p2, 
  paired = FALSE, 
  var.equal = FALSE
)
fita_5
## 
##  Welch Two Sample t-test
## 
## data:  Action_13_CTA by Testing_6_CTA
## t = -6.0874, df = 1830.3, p-value = 1.395e-09
## alternative hypothesis: true difference in means between group 0 and group 1 is not equal to 0
## 95 percent confidence interval:
##  -0.3321985 -0.1703007
## sample estimates:
## mean in group 0 mean in group 1 
##        1.045265        1.296515
model_parameters(fita_5)
## Welch Two Sample t-test
## 
## Parameter     |         Group | Testing_6_CTA = 0 | Testing_6_CTA = 1 | Difference |         95% CI | t(1830.26) |      p
## -------------------------------------------------------------------------------------------------------------------------
## Action_13_CTA | Testing_6_CTA |              1.05 |              1.30 |      -0.25 | [-0.33, -0.17] |      -6.09 | < .001
## 
## Alternative hypothesis: true difference in means between group 0 and group 1 is not equal to 0
fita_6 <- t.test(
  formula = Action_13_CTA ~ Vaccine_7_CTA, 
  data = p2, 
  paired = FALSE, 
  var.equal = FALSE
)
fita_6
## 
##  Welch Two Sample t-test
## 
## data:  Action_13_CTA by Vaccine_7_CTA
## t = 5.6039, df = 3032.7, p-value = 2.284e-08
## alternative hypothesis: true difference in means between group 0 and group 1 is not equal to 0
## 95 percent confidence interval:
##  0.05609508 0.11647576
## sample estimates:
## mean in group 0 mean in group 1 
##        1.096263        1.009978
model_parameters(fita_6)
## Welch Two Sample t-test
## 
## Parameter     |         Group | Vaccine_7_CTA = 0 | Vaccine_7_CTA = 1 | Difference |       95% CI | t(3032.69) |      p
## -----------------------------------------------------------------------------------------------------------------------
## Action_13_CTA | Vaccine_7_CTA |              1.10 |              1.01 |       0.09 | [0.06, 0.12] |       5.60 | < .001
## 
## Alternative hypothesis: true difference in means between group 0 and group 1 is not equal to 0
library(effectsize)
cohens_d(fita_0)
## Warning in .effectsize_t.test(model, type = type, verbose = verbose, ...):
## Unable to retrieve data from htest object. Using t_to_d() approximation.
## d     |         95% CI
## ----------------------
## -0.23 | [-0.34, -0.13]
cohens_d(fita_1)
## Warning in .effectsize_t.test(model, type = type, verbose = verbose, ...):
## Unable to retrieve data from htest object. Using t_to_d() approximation.
## d    |        95% CI
## --------------------
## 0.08 | [-0.21, 0.37]
cohens_d(fita_2)
## Warning in .effectsize_t.test(model, type = type, verbose = verbose, ...):
## Unable to retrieve data from htest object. Using t_to_d() approximation.
## d    |       95% CI
## -------------------
## 0.24 | [0.08, 0.40]
cohens_d(fita_3)
## Warning in .effectsize_t.test(model, type = type, verbose = verbose, ...):
## Unable to retrieve data from htest object. Using t_to_d() approximation.
## d     |         95% CI
## ----------------------
## -0.47 | [-0.63, -0.30]
cohens_d(fita_5)
## Warning in .effectsize_t.test(model, type = type, verbose = verbose, ...):
## Unable to retrieve data from htest object. Using t_to_d() approximation.
## d     |         95% CI
## ----------------------
## -0.28 | [-0.38, -0.19]
cohens_d(fita_6)
## Warning in .effectsize_t.test(model, type = type, verbose = verbose, ...):
## Unable to retrieve data from htest object. Using t_to_d() approximation.
## d    |       95% CI
## -------------------
## 0.20 | [0.13, 0.27]

RQ7: How does the socio-economic status affect use of call to action in health communication messages?

p4 <- p2 %>% 
  select(minority_percent, Poverty_percent, Action_13_CTA)
p4
## # A tibble: 9,867 × 3
##    minority_percent Poverty_percent Action_13_CTA
##               <dbl>           <dbl>         <dbl>
##  1             63.5            11.8             1
##  2             63.5            11.8             1
##  3             63.5            11.8             1
##  4             63.5            11.8             1
##  5             63.5            11.8             1
##  6             63.5            11.8             1
##  7             39.8            10.2             1
##  8             45.4             9.1             1
##  9             28.6            11.6             1
## 10             63.5            11.8             1
## # … with 9,857 more rows
correlation(p4)
## # Correlation Matrix (pearson-method)
## 
## Parameter1       |      Parameter2 |        r |         95% CI | t(9865) |         p
## ------------------------------------------------------------------------------------
## minority_percent | Poverty_percent |     0.32 | [ 0.30,  0.34] |   33.62 | < .001***
## minority_percent |   Action_13_CTA | 4.27e-03 | [-0.02,  0.02] |    0.42 | 0.672    
## Poverty_percent  |   Action_13_CTA |    -0.06 | [-0.08, -0.04] |   -5.77 | < .001***
## 
## p-value adjustment method: Holm (1979)
## Observations: 9867
rmat1 <- correlation(p4)
plot(summary(rmat1))

fit_0a <- lm(Action_13_CTA  ~ minority_percent,  data = p4 )
fit_0a
## 
## Call:
## lm(formula = Action_13_CTA ~ minority_percent, data = p4)
## 
## Coefficients:
##      (Intercept)  minority_percent  
##        1.0791449         0.0002479
summary(fit_0a)
## 
## Call:
## lm(formula = Action_13_CTA ~ minority_percent, data = p4)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.0949 -0.0907 -0.0877 -0.0846 15.9110 
## 
## Coefficients:
##                   Estimate Std. Error t value Pr(>|t|)    
## (Intercept)      1.0791449  0.0238420  45.262   <2e-16 ***
## minority_percent 0.0002479  0.0005847   0.424    0.672    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.9647 on 9865 degrees of freedom
## Multiple R-squared:  1.822e-05,  Adjusted R-squared:  -8.315e-05 
## F-statistic: 0.1797 on 1 and 9865 DF,  p-value: 0.6716
model_parameters(fit_0a)
## Parameter        | Coefficient |       SE |        95% CI | t(9865) |      p
## ----------------------------------------------------------------------------
## (Intercept)      |        1.08 |     0.02 | [ 1.03, 1.13] |   45.26 | < .001
## minority percent |    2.48e-04 | 5.85e-04 | [ 0.00, 0.00] |    0.42 | 0.672
## 
## Uncertainty intervals (equal-tailed) and p-values (two-tailed) computed
##   using a Wald t-distribution approximation.
library(ggeffects)
plot(ggpredict(fit_0a, terms = "minority_percent"))

fit_0b <- lm(Action_13_CTA  ~ Poverty_percent,  data = p4 )
fit_0b
## 
## Call:
## lm(formula = Action_13_CTA ~ Poverty_percent, data = p4)
## 
## Coefficients:
##     (Intercept)  Poverty_percent  
##          1.3636          -0.0218
summary(fit_0b)
## 
## Call:
## lm(formula = Action_13_CTA ~ Poverty_percent, data = p4)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.1717 -0.1368 -0.0867 -0.0562 15.8588 
## 
## Coefficients:
##                  Estimate Std. Error t value Pr(>|t|)    
## (Intercept)      1.363552   0.048631  28.039  < 2e-16 ***
## Poverty_percent -0.021801   0.003775  -5.774 7.96e-09 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.9631 on 9865 degrees of freedom
## Multiple R-squared:  0.003369,   Adjusted R-squared:  0.003268 
## F-statistic: 33.34 on 1 and 9865 DF,  p-value: 7.958e-09
model_parameters(fit_0b)
## Parameter       | Coefficient |       SE |         95% CI | t(9865) |      p
## ----------------------------------------------------------------------------
## (Intercept)     |        1.36 |     0.05 | [ 1.27,  1.46] |   28.04 | < .001
## Poverty percent |       -0.02 | 3.78e-03 | [-0.03, -0.01] |   -5.77 | < .001
## 
## Uncertainty intervals (equal-tailed) and p-values (two-tailed) computed
##   using a Wald t-distribution approximation.
library(ggeffects)
plot(ggpredict(fit_0b, terms = "Poverty_percent"))

library(performance)
compare_performance(fit_0a, fit_0b, metrics = c("R2", "R2_adj"))
## # Comparison of Model Performance Indices
## 
## Name   | Model |        R2 |  R2 (adj.)
## ---------------------------------------
## fit_0a |    lm | 1.822e-05 | -8.315e-05
## fit_0b |    lm |     0.003 |      0.003

Partial effects

fit_1a <- lm (Action_13_CTA  ~ minority_percent + Poverty_percent, data = p4 )
fit_1a
## 
## Call:
## lm(formula = Action_13_CTA ~ minority_percent + Poverty_percent, 
##     data = p4)
## 
## Coefficients:
##      (Intercept)  minority_percent   Poverty_percent  
##         1.347166          0.001481         -0.024871
summary(fit_1a)
## 
## Call:
## lm(formula = Action_13_CTA ~ minority_percent + Poverty_percent, 
##     data = p4)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.1612 -0.1477 -0.1006 -0.0432 15.8476 
## 
## Coefficients:
##                    Estimate Std. Error t value Pr(>|t|)    
## (Intercept)       1.3471664  0.0490950  27.440  < 2e-16 ***
## minority_percent  0.0014808  0.0006161   2.403   0.0163 *  
## Poverty_percent  -0.0248714  0.0039849  -6.241 4.51e-10 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.9628 on 9864 degrees of freedom
## Multiple R-squared:  0.003952,   Adjusted R-squared:  0.00375 
## F-statistic: 19.57 on 2 and 9864 DF,  p-value: 3.301e-09
parameters(fit_1a)
## Parameter        | Coefficient |       SE |         95% CI | t(9864) |      p
## -----------------------------------------------------------------------------
## (Intercept)      |        1.35 |     0.05 | [ 1.25,  1.44] |   27.44 | < .001
## minority percent |    1.48e-03 | 6.16e-04 | [ 0.00,  0.00] |    2.40 | 0.016 
## Poverty percent  |       -0.02 | 3.98e-03 | [-0.03, -0.02] |   -6.24 | < .001
## 
## Uncertainty intervals (equal-tailed) and p-values (two-tailed) computed
##   using a Wald t-distribution approximation.
performance(fit_1a)
## # Indices of model performance
## 
## AIC       |       BIC |    R2 | R2 (adj.) |  RMSE | Sigma
## ---------------------------------------------------------
## 27259.182 | 27287.969 | 0.004 |     0.004 | 0.963 | 0.963
plot(ggpredict(fit_1a, terms = c("minority_percent", "Poverty_percent[10,12,15]")))

Simple effect

fit_1b <- lm (Action_13_CTA  ~ minority_percent * Poverty_percent, data = p4 )
fit_1b
## 
## Call:
## lm(formula = Action_13_CTA ~ minority_percent * Poverty_percent, 
##     data = p4)
## 
## Coefficients:
##                      (Intercept)                  minority_percent  
##                         0.772448                          0.017797  
##                  Poverty_percent  minority_percent:Poverty_percent  
##                         0.018443                         -0.001198
summary(fit_1b)
## 
## Call:
## lm(formula = Action_13_CTA ~ minority_percent * Poverty_percent, 
##     data = p4)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.2223 -0.1466 -0.0889 -0.0511 15.8175 
## 
## Coefficients:
##                                    Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                       0.7724484  0.1156585   6.679 2.54e-11 ***
## minority_percent                  0.0177970  0.0030370   5.860 4.77e-09 ***
## Poverty_percent                   0.0184435  0.0088411   2.086    0.037 *  
## minority_percent:Poverty_percent -0.0011983  0.0002184  -5.486 4.21e-08 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.9614 on 9863 degrees of freedom
## Multiple R-squared:  0.006982,   Adjusted R-squared:  0.00668 
## F-statistic: 23.12 on 3 and 9863 DF,  p-value: 6.615e-15
parameters(fit_1b)
## Parameter                          | Coefficient |       SE |         95% CI | t(9863) |      p
## -----------------------------------------------------------------------------------------------
## (Intercept)                        |        0.77 |     0.12 | [ 0.55,  1.00] |    6.68 | < .001
## minority percent                   |        0.02 | 3.04e-03 | [ 0.01,  0.02] |    5.86 | < .001
## Poverty percent                    |        0.02 | 8.84e-03 | [ 0.00,  0.04] |    2.09 | 0.037 
## minority percent * Poverty percent |   -1.20e-03 | 2.18e-04 | [ 0.00,  0.00] |   -5.49 | < .001
## 
## Uncertainty intervals (equal-tailed) and p-values (two-tailed) computed
##   using a Wald t-distribution approximation.
performance(fit_1b)
## # Indices of model performance
## 
## AIC       |       BIC |    R2 | R2 (adj.) |  RMSE | Sigma
## ---------------------------------------------------------
## 27231.116 | 27267.101 | 0.007 |     0.007 | 0.961 | 0.961
plot(ggpredict(fit_1b, terms = c("minority_percent", "Poverty_percent[10,12,15]")))

no need centering because 0 % is meaningful

RQ8: How does efficacy statements predict call to actions?

p5 <- p2 %>% 
  select(Action_13_CTA, Positive_14a_Number, Negative_14b_Number, Individual_14c_Number, Collective_14d_Number)
p5
## # A tibble: 9,867 × 5
##    Action_13_CTA Positive_14a_Number Negative_14b_Number Individual_14c_Number
##            <dbl>               <dbl>               <dbl>                 <dbl>
##  1             1                   0                   0                     0
##  2             1                   0                   0                     0
##  3             1                   0                   0                     0
##  4             1                   0                   0                     0
##  5             1                   0                   0                     0
##  6             1                   0                   0                     0
##  7             1                   0                   0                     0
##  8             1                   0                   0                     0
##  9             1                   0                   0                     0
## 10             1                   1                   0                     0
## # … with 9,857 more rows, and 1 more variable: Collective_14d_Number <dbl>
correlation(p5)
## # Correlation Matrix (pearson-method)
## 
## Parameter1            |            Parameter2 |        r |        95% CI | t(9865) |         p
## ----------------------------------------------------------------------------------------------
## Action_13_CTA         |   Positive_14a_Number |     0.06 | [ 0.04, 0.08] |    6.35 | < .001***
## Action_13_CTA         |   Negative_14b_Number | 6.12e-03 | [-0.01, 0.03] |    0.61 | > .999   
## Action_13_CTA         | Individual_14c_Number |     0.03 | [ 0.01, 0.05] |    3.35 | 0.003**  
## Action_13_CTA         | Collective_14d_Number |     0.05 | [ 0.03, 0.07] |    5.36 | < .001***
## Positive_14a_Number   |   Negative_14b_Number |     0.02 | [ 0.01, 0.04] |    2.48 | 0.040*   
## Positive_14a_Number   | Individual_14c_Number |     0.52 | [ 0.50, 0.53] |   60.01 | < .001***
## Positive_14a_Number   | Collective_14d_Number |     0.83 | [ 0.83, 0.84] |  149.60 | < .001***
## Negative_14b_Number   | Individual_14c_Number |     0.21 | [ 0.19, 0.23] |   21.49 | < .001***
## Negative_14b_Number   | Collective_14d_Number |     0.13 | [ 0.11, 0.15] |   12.73 | < .001***
## Individual_14c_Number | Collective_14d_Number | 6.26e-03 | [-0.01, 0.03] |    0.62 | > .999   
## 
## p-value adjustment method: Holm (1979)
## Observations: 9867
rmat_1 <- correlation(p5)
plot(summary(rmat_1))

Total effects

fita_0 <- lm(Action_13_CTA ~ Positive_14a_Number , data = p5 )
fita_0
## 
## Call:
## lm(formula = Action_13_CTA ~ Positive_14a_Number, data = p5)
## 
## Coefficients:
##         (Intercept)  Positive_14a_Number  
##              1.0485               0.0634
summary (fita_0)
## 
## Call:
## lm(formula = Action_13_CTA ~ Positive_14a_Number, data = p5)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.1753 -0.1119 -0.0485 -0.0485 15.9515 
## 
## Coefficients:
##                     Estimate Std. Error t value Pr(>|t|)    
## (Intercept)         1.048487   0.011550  90.777  < 2e-16 ***
## Positive_14a_Number 0.063399   0.009985   6.349 2.26e-10 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.9627 on 9865 degrees of freedom
## Multiple R-squared:  0.00407,    Adjusted R-squared:  0.003969 
## F-statistic: 40.31 on 1 and 9865 DF,  p-value: 2.259e-10
fita_1 <- lm(Action_13_CTA ~ Negative_14b_Number, data = p5 )
fita_1
## 
## Call:
## lm(formula = Action_13_CTA ~ Negative_14b_Number, data = p5)
## 
## Coefficients:
##         (Intercept)  Negative_14b_Number  
##             1.08777              0.03012
summary (fita_1)
## 
## Call:
## lm(formula = Action_13_CTA ~ Negative_14b_Number, data = p5)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.0878 -0.0878 -0.0878 -0.0878 15.9122 
## 
## Coefficients:
##                     Estimate Std. Error t value Pr(>|t|)    
## (Intercept)         1.087768   0.009763 111.418   <2e-16 ***
## Negative_14b_Number 0.030115   0.049554   0.608    0.543    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.9647 on 9865 degrees of freedom
## Multiple R-squared:  3.744e-05,  Adjusted R-squared:  -6.393e-05 
## F-statistic: 0.3693 on 1 and 9865 DF,  p-value: 0.5434
fita_2<- lm(Action_13_CTA ~ Individual_14c_Number, data = p5 )
fita_2
## 
## Call:
## lm(formula = Action_13_CTA ~ Individual_14c_Number, data = p5)
## 
## Coefficients:
##           (Intercept)  Individual_14c_Number  
##               1.07751                0.06016
summary (fita_2)
## 
## Call:
## lm(formula = Action_13_CTA ~ Individual_14c_Number, data = p5)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.1377 -0.0775 -0.0775 -0.0775 15.9225 
## 
## Coefficients:
##                       Estimate Std. Error t value Pr(>|t|)    
## (Intercept)            1.07751    0.01023 105.292  < 2e-16 ***
## Individual_14c_Number  0.06016    0.01795   3.351 0.000808 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.9642 on 9865 degrees of freedom
## Multiple R-squared:  0.001137,   Adjusted R-squared:  0.001036 
## F-statistic: 11.23 on 1 and 9865 DF,  p-value: 0.0008081
fita_3 <- lm(Action_13_CTA ~ Collective_14d_Number, data = p5 )
fita_3
## 
## Call:
## lm(formula = Action_13_CTA ~ Collective_14d_Number, data = p5)
## 
## Coefficients:
##           (Intercept)  Collective_14d_Number  
##               1.05907                0.06246
summary (fita_3)
## 
## Call:
## lm(formula = Action_13_CTA ~ Collective_14d_Number, data = p5)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -1.1840 -0.1215 -0.0591 -0.0591 15.9409 
## 
## Coefficients:
##                       Estimate Std. Error t value Pr(>|t|)    
## (Intercept)            1.05907    0.01113   95.13  < 2e-16 ***
## Collective_14d_Number  0.06246    0.01165    5.36 8.51e-08 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.9633 on 9865 degrees of freedom
## Multiple R-squared:  0.002904,   Adjusted R-squared:  0.002803 
## F-statistic: 28.73 on 1 and 9865 DF,  p-value: 8.51e-08
library(performance)
compare_performance(fita_0, fita_1, fita_2, fita_3, metrics = c("R2", "R2_adj"))
## # Comparison of Model Performance Indices
## 
## Name   | Model |        R2 |  R2 (adj.)
## ---------------------------------------
## fita_0 |    lm |     0.004 |      0.004
## fita_1 |    lm | 3.744e-05 | -6.393e-05
## fita_2 |    lm |     0.001 |      0.001
## fita_3 |    lm |     0.003 |      0.003

Partial effects

fit1_0 <- lm(Action_13_CTA ~ Positive_14a_Number + Negative_14b_Number, data = p5 )
fit1_0
## 
## Call:
## lm(formula = Action_13_CTA ~ Positive_14a_Number + Negative_14b_Number, 
##     data = p5)
## 
## Coefficients:
##         (Intercept)  Positive_14a_Number  Negative_14b_Number  
##             1.04811              0.06329              0.02230
parameters(fit1_0)
## Parameter           | Coefficient |       SE |        95% CI | t(9864) |      p
## -------------------------------------------------------------------------------
## (Intercept)         |        1.05 |     0.01 | [ 1.03, 1.07] |   90.50 | < .001
## Positive 14a Number |        0.06 | 9.99e-03 | [ 0.04, 0.08] |    6.34 | < .001
## Negative 14b Number |        0.02 |     0.05 | [-0.07, 0.12] |    0.45 | 0.652
## 
## Uncertainty intervals (equal-tailed) and p-values (two-tailed) computed
##   using a Wald t-distribution approximation.
performance(fit1_0)
## # Indices of model performance
## 
## AIC       |       BIC |    R2 | R2 (adj.) |  RMSE | Sigma
## ---------------------------------------------------------
## 27257.809 | 27286.597 | 0.004 |     0.004 | 0.963 | 0.963
plot(ggpredict(fit1_0, terms = c("Positive_14a_Number", "Negative_14b_Number[1,3,6]")))

fit1_1 <- lm(Action_13_CTA ~ Individual_14c_Number + Collective_14d_Number, data = p5 )
fit1_1
## 
## Call:
## lm(formula = Action_13_CTA ~ Individual_14c_Number + Collective_14d_Number, 
##     data = p5)
## 
## Coefficients:
##           (Intercept)  Individual_14c_Number  Collective_14d_Number  
##               1.04842                0.05956                0.06222
parameters(fit1_1)
## Parameter             | Coefficient |   SE |       95% CI | t(9864) |      p
## ----------------------------------------------------------------------------
## (Intercept)           |        1.05 | 0.01 | [1.03, 1.07] |   90.54 | < .001
## Individual 14c Number |        0.06 | 0.02 | [0.02, 0.09] |    3.32 | < .001
## Collective 14d Number |        0.06 | 0.01 | [0.04, 0.09] |    5.34 | < .001
## 
## Uncertainty intervals (equal-tailed) and p-values (two-tailed) computed
##   using a Wald t-distribution approximation.
performance(fit1_1)
## # Indices of model performance
## 
## AIC       |       BIC |    R2 | R2 (adj.) |  RMSE | Sigma
## ---------------------------------------------------------
## 27258.524 | 27287.312 | 0.004 |     0.004 | 0.963 | 0.963
plot(ggpredict(fit1_1, terms = c("Individual_14c_Number", "Collective_14d_Number[2,4,8]")))

Simple effects

fit1_1 <- lm(Action_13_CTA ~ Positive_14a_Number * Negative_14b_Number, data = p5 )
fit1_1
## 
## Call:
## lm(formula = Action_13_CTA ~ Positive_14a_Number * Negative_14b_Number, 
##     data = p5)
## 
## Coefficients:
##                             (Intercept)  
##                                 1.04970  
##                     Positive_14a_Number  
##                                 0.06068  
##                     Negative_14b_Number  
##                                -0.06110  
## Positive_14a_Number:Negative_14b_Number  
##                                 0.09899
parameters(fit1_1)
## Parameter                                 | Coefficient |   SE |        95% CI | t(9863) |      p
## -------------------------------------------------------------------------------------------------
## (Intercept)                               |        1.05 | 0.01 | [ 1.03, 1.07] |   90.48 | < .001
## Positive 14a Number                       |        0.06 | 0.01 | [ 0.04, 0.08] |    6.03 | < .001
## Negative 14b Number                       |       -0.06 | 0.06 | [-0.18, 0.06] |   -0.98 | 0.328 
## Positive 14a Number * Negative 14b Number |        0.10 | 0.05 | [ 0.01, 0.19] |    2.19 | 0.029
## 
## Uncertainty intervals (equal-tailed) and p-values (two-tailed) computed
##   using a Wald t-distribution approximation.
performance(fit1_1)
## # Indices of model performance
## 
## AIC       |       BIC |    R2 | R2 (adj.) |  RMSE | Sigma
## ---------------------------------------------------------
## 27255.034 | 27291.019 | 0.005 |     0.004 | 0.962 | 0.963
plot(ggpredict(fit1_1, terms = c("Positive_14a_Number", "Negative_14b_Number[1,3,6]")))

fit_check1_1 <- check_model(fit1_1)
fit_check1_1

fit1_2 <- lm(Action_13_CTA ~ Individual_14c_Number * Collective_14d_Number, data = p5 )
fit1_2
## 
## Call:
## lm(formula = Action_13_CTA ~ Individual_14c_Number * Collective_14d_Number, 
##     data = p5)
## 
## Coefficients:
##                                 (Intercept)  
##                                     1.04750  
##                       Individual_14c_Number  
##                                     0.06512  
##                       Collective_14d_Number  
##                                     0.06464  
## Individual_14c_Number:Collective_14d_Number  
##                                    -0.01387
parameters(fit1_2)
## Parameter                                     | Coefficient |   SE |        95% CI | t(9863) |      p
## -----------------------------------------------------------------------------------------------------
## (Intercept)                                   |        1.05 | 0.01 | [ 1.02, 1.07] |   89.68 | < .001
## Individual 14c Number                         |        0.07 | 0.02 | [ 0.03, 0.10] |    3.23 | 0.001 
## Collective 14d Number                         |        0.06 | 0.01 | [ 0.04, 0.09] |    5.25 | < .001
## Individual 14c Number * Collective 14d Number |       -0.01 | 0.02 | [-0.06, 0.03] |   -0.61 | 0.545
## 
## Uncertainty intervals (equal-tailed) and p-values (two-tailed) computed
##   using a Wald t-distribution approximation.
performance(fit1_2)
## # Indices of model performance
## 
## AIC       |       BIC |    R2 | R2 (adj.) |  RMSE | Sigma
## ---------------------------------------------------------
## 27260.157 | 27296.142 | 0.004 |     0.004 | 0.963 | 0.963
plot(ggpredict(fit1_2, terms = c("Individual_14c_Number", "Collective_14d_Number[2,4,8]")))

fit_check1_2 <- check_model(fit1_2)
fit_check1_2

#https://stats.oarc.ucla.edu/r/dae/zinb/

require(ggplot2)
require(pscl)
## Loading required package: pscl
## Classes and Methods for R developed in the
## Political Science Computational Laboratory
## Department of Political Science
## Stanford University
## Simon Jackman
## hurdle and zeroinfl functions by Achim Zeileis
require(MASS)
## Loading required package: MASS
## 
## Attaching package: 'MASS'
## The following object is masked from 'package:dplyr':
## 
##     select
require(boot)
## Loading required package: boot
library(ggplot2)
library(pscl)
library(MASS)
library(boot)
require(nonnest2)
## Loading required package: nonnest2
## This is nonnest2 0.5-5.
## nonnest2 has not been tested with all combinations of model classes.
require(lmtest)
## Loading required package: lmtest
## Loading required package: zoo
## 
## Attaching package: 'zoo'
## The following objects are masked from 'package:base':
## 
##     as.Date, as.Date.numeric
p2
## # A tibble: 9,867 × 29
##    Post_oldid Real_ID date     COVID_Post RiskFactor_2_CTA SocialDisparities_3_…
##    <chr>        <dbl> <chr>         <dbl>            <dbl>                 <dbl>
##  1 1             2069 9/22/20           1                0                     0
##  2 2             2070 8/27/20           1                0                     0
##  3 3             2071 12/29/20          1                0                     0
##  4 4             2072 9/29/20           1                0                     0
##  5 5             2073 10/6/20           1                0                     0
##  6 6             2074 12/31/20          1                0                     0
##  7 7              403 4/2/20            1                0                     0
##  8 8             5425 12/1/20           1                0                     0
##  9 9             5842 12/20/20          1                0                     0
## 10 10            2075 3/5/20            1                0                     0
## # … with 9,857 more rows, and 23 more variables: Debunk_4_CTA <dbl>,
## #   UncertaintyReduction_5_CTA <dbl>, Testing_6_CTA <dbl>, Vaccine_7_CTA <dbl>,
## #   Action_13_CTA <dbl>, Positive_14a_Number <dbl>, Negative_14b_Number <dbl>,
## #   Individual_14c_Number <dbl>, Collective_14d_Number <dbl>,
## #   `State_ recode` <dbl>, Gov_poli <fct>, Trifecta <fct>,
## #   `White_\bpercent` <dbl>, minority_percent <dbl>, Poverty_percent <dbl>,
## #   ProspertiyRanking <dbl>, year <dbl>, month <dbl>, day <dbl>, state <chr>, …
colnames(p2)
##  [1] "Post_oldid"                 "Real_ID"                   
##  [3] "date"                       "COVID_Post"                
##  [5] "RiskFactor_2_CTA"           "SocialDisparities_3_CTA"   
##  [7] "Debunk_4_CTA"               "UncertaintyReduction_5_CTA"
##  [9] "Testing_6_CTA"              "Vaccine_7_CTA"             
## [11] "Action_13_CTA"              "Positive_14a_Number"       
## [13] "Negative_14b_Number"        "Individual_14c_Number"     
## [15] "Collective_14d_Number"      "State_ recode"             
## [17] "Gov_poli"                   "Trifecta"                  
## [19] "White_\bpercent"            "minority_percent"          
## [21] "Poverty_percent"            "ProspertiyRanking"         
## [23] "year"                       "month"                     
## [25] "day"                        "state"                     
## [27] "cases"                      "efficacy_total"            
## [29] "efficacy_total1"

###Zero inflated models

#Positive_14a_Number vs. RiskFactor_2_CTA (contibous vs. categories)

m1_01 <- zeroinfl(Positive_14a_Number ~ RiskFactor_2_CTA, 
  data = p2, dist = "negbin")
summary(m1_01)
## 
## Call:
## zeroinfl(formula = Positive_14a_Number ~ RiskFactor_2_CTA, data = p2, 
##     dist = "negbin")
## 
## Pearson residuals:
##     Min      1Q  Median      3Q     Max 
## -0.7457 -0.6428 -0.6428  0.4450  8.0592 
## 
## Count model coefficients (negbin with log link):
##                  Estimate Std. Error z value Pr(>|z|)    
## (Intercept)      -0.48069    0.04476 -10.738  < 2e-16 ***
## RiskFactor_2_CTA  0.34364    0.05782   5.944 2.79e-09 ***
## Log(theta)        0.42858    0.10643   4.027 5.65e-05 ***
## 
## Zero-inflation model coefficients (binomial with logit link):
##                  Estimate Std. Error z value Pr(>|z|)   
## (Intercept)       -3.0697     0.9375  -3.274  0.00106 **
## RiskFactor_2_CTA  -8.2829    44.7778  -0.185  0.85325   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 
## 
## Theta = 1.5351 
## Number of iterations in BFGS optimization: 34 
## Log-likelihood: -1.066e+04 on 5 Df

#Positive_14a_Number ~ minority_percent (continous vs. contious)

m1_0 <- zeroinfl(Positive_14a_Number ~ minority_percent, 
  data = p2, dist = "negbin")
summary(m1_0)
## 
## Call:
## zeroinfl(formula = Positive_14a_Number ~ minority_percent, data = p2, 
##     dist = "negbin")
## 
## Pearson residuals:
##     Min      1Q  Median      3Q     Max 
## -0.7373 -0.6909 -0.5453  0.3514  9.1417 
## 
## Count model coefficients (negbin with log link):
##                   Estimate Std. Error z value Pr(>|z|)    
## (Intercept)      -0.151271   0.068852  -2.197   0.0280 *  
## minority_percent -0.002513   0.001272  -1.976   0.0482 *  
## Log(theta)        0.935203   0.116985   7.994  1.3e-15 ***
## 
## Zero-inflation model coefficients (binomial with logit link):
##                  Estimate Std. Error z value Pr(>|z|)    
## (Intercept)       0.68499    0.15625   4.384 1.17e-05 ***
## minority_percent -0.06610    0.00613 -10.784  < 2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 
## 
## Theta = 2.5477 
## Number of iterations in BFGS optimization: 21 
## Log-likelihood: -1.062e+04 on 5 Df
m1_1 <- zeroinfl(Negative_14b_Number ~ minority_percent, 
  data = p2, dist = "negbin")
summary(m1_1)
## 
## Call:
## zeroinfl(formula = Negative_14b_Number ~ minority_percent, data = p2, 
##     dist = "negbin")
## 
## Pearson residuals:
##      Min       1Q   Median       3Q      Max 
## -0.11448 -0.10698 -0.10327 -0.09904 30.80180 
## 
## Count model coefficients (negbin with log link):
##                  Estimate Std. Error z value Pr(>|z|)
## (Intercept)      -1.93796    1.20766  -1.605    0.109
## minority_percent  0.01666    0.01022   1.629    0.103
## Log(theta)       -0.75055    1.69809  -0.442    0.658
## 
## Zero-inflation model coefficients (binomial with logit link):
##                  Estimate Std. Error z value Pr(>|z|)  
## (Intercept)      2.411832   1.292669   1.866   0.0621 .
## minority_percent 0.003307   0.009709   0.341   0.7334  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 
## 
## Theta = 0.4721 
## Number of iterations in BFGS optimization: 21 
## Log-likelihood: -849.2 on 5 Df
m1_2 <- zeroinfl(Individual_14c_Number ~ minority_percent, 
  data = p2, dist = "negbin")
## Warning in value[[3L]](cond): system is computationally singular: reciprocal
## condition number = 8.26018e-19FALSE
summary(m1_2)
## 
## Call:
## zeroinfl(formula = Individual_14c_Number ~ minority_percent, data = p2, 
##     dist = "negbin")
## 
## Pearson residuals:
##     Min      1Q  Median      3Q     Max 
## -0.3566 -0.3482 -0.3434 -0.3339 12.0980 
## 
## Count model coefficients (negbin with log link):
##                   Estimate Std. Error z value Pr(>|z|)
## (Intercept)      -1.579088         NA      NA       NA
## minority_percent -0.003602         NA      NA       NA
## Log(theta)       -1.058116         NA      NA       NA
## 
## Zero-inflation model coefficients (binomial with logit link):
##                  Estimate Std. Error z value Pr(>|z|)
## (Intercept)         1.481         NA      NA       NA
## minority_percent   -3.157         NA      NA       NA
## 
## Theta = 0.3471 
## Number of iterations in BFGS optimization: 28 
## Log-likelihood: -4907 on 5 Df
m1_2 <- zeroinfl(Collective_14d_Number ~ minority_percent, 
  data = p2, dist = "negbin")
summary(m1_2)
## 
## Call:
## zeroinfl(formula = Collective_14d_Number ~ minority_percent, data = p2, 
##     dist = "negbin")
## 
## Pearson residuals:
##     Min      1Q  Median      3Q     Max 
## -0.6737 -0.6156 -0.4899  0.5212 12.8568 
## 
## Count model coefficients (negbin with log link):
##                   Estimate Std. Error z value Pr(>|z|)    
## (Intercept)      -0.396547   0.088159  -4.498 6.86e-06 ***
## minority_percent -0.002061   0.001580  -1.304    0.192    
## Log(theta)        0.846818   0.129362   6.546 5.90e-11 ***
## 
## Zero-inflation model coefficients (binomial with logit link):
##                   Estimate Std. Error z value Pr(>|z|)    
## (Intercept)       1.381123   0.158324   8.723   <2e-16 ***
## minority_percent -0.078370   0.006336 -12.368   <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 
## 
## Theta = 2.3322 
## Number of iterations in BFGS optimization: 22 
## Log-likelihood: -8943 on 5 Df

###Risk factor vs. efficacy

#??? Is this the interactions? How to interprete that.

m1 <- zeroinfl(Action_13_CTA ~ efficacy_total|RiskFactor_2_CTA,
  data = p2, dist = "negbin")
## Warning in sqrt(diag(vc)[np]): NaNs produced
summary(m1)
## 
## Call:
## zeroinfl(formula = Action_13_CTA ~ efficacy_total | RiskFactor_2_CTA, 
##     data = p2, dist = "negbin")
## 
## Pearson residuals:
##      Min       1Q   Median       3Q      Max 
## -1.08063 -0.10191 -0.04865 -0.04865 15.56690 
## 
## Count model coefficients (negbin with log link):
##                 Estimate Std. Error z value Pr(>|z|)    
## (Intercept)     0.048643   0.011609   4.190 2.79e-05 ***
## efficacy_total  0.053225   0.009144   5.821 5.85e-09 ***
## Log(theta)     16.322734        NaN     NaN      NaN    
## 
## Zero-inflation model coefficients (binomial with logit link):
##                  Estimate Std. Error z value Pr(>|z|)
## (Intercept)       -16.413     40.112  -0.409    0.682
## RiskFactor_2_CTA   -1.369    203.184  -0.007    0.995
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 
## 
## Theta = 12270811.5686 
## Number of iterations in BFGS optimization: 46 
## Log-likelihood: -1.144e+04 on 5 Df
m2 <- zeroinfl(Action_13_CTA ~ efficacy_total1|RiskFactor_2_CTA,
  data = p2, dist = "negbin")
summary(m2)
## 
## Call:
## zeroinfl(formula = Action_13_CTA ~ efficacy_total1 | RiskFactor_2_CTA, 
##     data = p2, dist = "negbin")
## 
## Pearson residuals:
##      Min       1Q   Median       3Q      Max 
## -1.08068 -0.10195 -0.04863 -0.04863 15.56703 
## 
## Count model coefficients (negbin with log link):
##                  Estimate Std. Error z value Pr(>|z|)    
## (Intercept)      0.048629   0.011607   4.190 2.79e-05 ***
## efficacy_total1  0.053278   0.009145   5.826 5.68e-09 ***
## Log(theta)      18.067151   1.712059  10.553  < 2e-16 ***
## 
## Zero-inflation model coefficients (binomial with logit link):
##                  Estimate Std. Error z value Pr(>|z|)
## (Intercept)       -17.553     70.941  -0.247    0.805
## RiskFactor_2_CTA   -1.322    351.334  -0.004    0.997
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 
## 
## Theta = 70220529.8648 
## Number of iterations in BFGS optimization: 68 
## Log-likelihood: -1.144e+04 on 5 Df

#DOH_uncetainty <- p %>% 
 #  filter(UncertaintyReduction_5_CTA != 88)
# DOH_uncetainty
#DOH_no88 <- p[p[,"RiskFactor_2_CTA"] != 88 | 
 #               p[,"SocialDisparities_3_CTA"] != 88 | 
 #               p[,"Debunk_4_CTA"] != 88 |  
  #                p[,"UncertaintyReduction_5_CTA"] != 88 | 
  #                p[,"Testing_6_CTA"] !=88 | 
  #                p[,"Vaccine_7_CTA"]!= 88,
   #             ]
 # 
 #  # DOH_no88
 # RiskFactor_2_CTA 
 # SocialDisparities_3_CTA 
 # Debunk_4_CTA 
 # UncertaintyReduction_5_CTA 
 # Testing_6_CTA 
 # Vaccine_7_CTA 
 # a
#a <- p[p$RiskFactor_2_CTA > 0 & p$SocialDisparities_3_CT > 0, 
 # p$Debunk_4_CTA > 0 & p$UncertaintyReduction_5_CTA > 0, 
 #   p$Testing_6_CTA > 0 & p$Vaccine_7_CTA > 0, 
 # ]
#a 
library("dplyr")  
 # a <- filter(p, RiskFactor_2_CTA != 88)
 # b <- filter(p, SocialDisparities_3_CTA != 88)
 # c <- filter(p, Debunk_4_CTA != 88)
 # d <- filter(p, UncertaintyReduction_5_CTA != 88)
 # e <- filter(p, Testing_6_CTA != 88)
 # f <- filter(p, Vaccine_7_CTA  != 88)
 # k <- filter(p, Action_13_CTA  != 88)
 # a
 # b
 # c
 # d
 # e
 # f
 # DOH_no88 <- rbind(a, b, c, d, e,f)
 # DOH_no88